by not flushing the shadows more often than is needed.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
This is pretty heavy handed, but this is a rare operation
(it might happen a dozen times during boot and then never
again), so it doesn't matter too much. */
- shadow_blow_tables(d);
+ if ( d->arch.paging.shadow.has_fast_mmio_entries )
+ {
+ shadow_blow_tables(d);
+ d->arch.paging.shadow.has_fast_mmio_entries = 0;
+ }
#endif
shadow_unlock(d);
{
/* Guest l1e maps MMIO space */
*sp = sh_l1e_mmio(guest_l1e_get_gfn(*gp), gflags);
+ if ( !d->arch.paging.shadow.has_fast_mmio_entries )
+ d->arch.paging.shadow.has_fast_mmio_entries = 1;
goto done;
}
struct shadow_page_info **hash_table;
int hash_walking; /* Some function is walking the hash table */
+ /* Fast MMIO path heuristic */
+ int has_fast_mmio_entries;
+
/* Shadow log-dirty bitmap */
unsigned long *dirty_bitmap;
unsigned int dirty_bitmap_size; /* in pages, bit per page */